﻿Imports AutoCAD

''' <summary>
''' CAD块引用服务
''' </summary>
Public Interface ICadBlockReferenceService
    Inherits ICadEntityService

    ''' <summary>
    ''' 获取对象OCS
    ''' </summary>
    ''' <param name="br"></param>
    ''' <returns></returns>
    Function GetOCS(ByRef br As AcadBlockReference) As AcadUCS

    ''' <summary>
    ''' 获取块
    ''' </summary>
    ''' <param name="br"></param>
    ''' <returns></returns>
    Function GetBlock(ByRef br As AcadBlock) As AcadBlock

    ''' <summary>
    ''' 是否镜像
    ''' </summary>
    ''' <param name="br"> 块引用 </param>
    ''' <returns></returns>
    Function IsMirror(ByRef br As AcadBlockReference) As Boolean


    ''' <summary>
    ''' 镜像法线,  保持块位置不变, 镜像块的法线,使模型发生反转
    ''' </summary>
    ''' <param name="br"></param>
    Sub 镜像法线(ByRef br As AcadBlockReference)

    ''' <summary>
    ''' 旋转块对象: 将br移动到0点, 然后执行旋转, 最后恢复原插入位置
    ''' </summary>
    ''' <param name="br"> 块对象 </param>
    ''' <param name="r"> 旋转角度[x,y,z] </param>
    Sub Rotation(ByRef br As AcadBlockReference, ByRef r() As Double)








    ''' <summary>
    ''' 将对象集合复制到块引用中. 且保持在模型空间总的位置关系
    ''' </summary>
    ''' <param name="br"></param>
    ''' <param name="ents"></param>
    ''' <remarks> 20250321 构建</remarks>
    Sub CopyObjectsToBlock(ByRef br As AcadBlockReference, ByRef ents As IEnumerable)

    ''' <summary>
    ''' 获取块引用的 OCS : 利用br的法线在零点坐标位置建立ucs
    ''' </summary>
    ''' <param name="br"></param>
    ''' <returns></returns>
    ''' <remarks> 20250321 构建</remarks>
    Function GetOCS2(ByRef br As AcadBlockReference) As AcadUCS



    ''' <summary>
    ''' 将图元集合移动到br
    ''' </summary>
    ''' <param name="br"></param>
    ''' <param name="ents"></param>
    Sub MoveObjectsToBlockReference(ByRef br As AcadBlockReference, ByRef ents As IEnumerable)

End Interface
